import "@/utils/ignoreError";
import ReactDOM from "react-dom/client";
import "./global.less";
import { router } from "./router";
import { RouterProvider } from "react-router-dom";
import { getENV } from "./utils";
import { ConfigProvider } from "antd";
import zhCN from "antd/es/locale/zh_CN"; // 引入中文语言包
import "moment/locale/zh-cn"; // 引入moment的中文语言包
import moment from "moment";
moment.locale("zh-cn"); // 设置moment区域为中文
console.log("当前环境：", getENV());

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  // <React.StrictMode>
  <ConfigProvider
    locale={zhCN}
    theme={{
      token: {
        // Seed Token，影响范围大
        colorPrimary: "rgba(0, 21, 41, 0.2)",
        borderRadius: 4,
      },
      components: {
        Segmented: {
          itemSelectedColor: "#fff",
          itemSelectedBg: "rgba(0, 21, 41, 0.8)",
        },
      },
    }}
  >
    <RouterProvider router={router} />
  </ConfigProvider>
  // </React.StrictMode>
);
